Correct return type of methods and typo correction.#15993
Correct return type of methods and typo correction.#15993magento-engcom-team merged 3 commits intomagento:2.2-developfrom
Conversation
|
@chirag-wagento I will create forwardport and backport request by own after merge with magento code. Please don't go in hurry for creating other developer's forwardport and backport pull request. We all are aware so we can create our own pull request at right time.Be professional. |
| * Initialize category object in registry | ||
| * | ||
| * @return Category | ||
| * @return Category|Boolean |
There was a problem hiding this comment.
How this method can return Boolean class?
There was a problem hiding this comment.
@orlangur
Method returns false value at if $rootid not found in category path ids.
if (!in_array($rootId, $category->getPathIds())) {
$this->_redirect('catalog/*/', ['_current' => true, 'id' => null]);
return false;
}
There was a problem hiding this comment.
false is bool primitive type, it has nothing to do with Boolean class.
There was a problem hiding this comment.
Okay.Thanks for helping. Should i add simple boolean or leave it as it is and remove file from PR?
There was a problem hiding this comment.
Add |bool and remove unneeded class import.
There was a problem hiding this comment.
I update the file. Please review it.
|
Hi @orlangur, thank you for the review. |
|
Hi @saurabh-aureate. Thank you for your contribution. Please, consider to port this solution to 2.3 release line. |
Description
Correct return type of methods and change return type.
Fixed Issues (if relevant)
N/A
Manual testing scenarios
N/A
Contribution checklist